-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace _wait_until with wait_until #9962
Conversation
CodSpeed Performance ReportMerging #9962 will improve performances by 10.64%Comparing Summary
Benchmarks breakdown
|
c79398f
to
05993bd
Compare
def _wait_until(condition, timeout, fail_msg): | ||
start = time.time() | ||
while not condition(): | ||
assert start + timeout > time.time(), fail_msg | ||
time.sleep(0.1) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is only used one place, do we need it as a separate function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. Shall I refactor then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would be good yes. while not condition()
does not read too well without any typing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there is another wait_until
function. I will use that one.
281a354
to
2d699f9
Compare
2d699f9
to
7cc2519
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 🚀
Issue
Utility function _wait_until is used only in a single test function,
so moving it there.replacing it with another (similar) one.Approach
🚗
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'just rapid-tests'
)When applicable